﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:actions="clr-namespace:MEF_Test.Bricks.Actions;assembly=MEF-Test.Bricks"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <DataTemplate x:Key="BrowserNodeBaseTemplate">
        <DataTemplate.Resources>
            <actions:ActionTemplateSelector x:Key="ActionTemplateSelector"/>
        </DataTemplate.Resources>
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <TextBlock Margin="-10,0,0,0" Foreground="#33555555" FontSize="30" FontWeight="Bold" Text="AVI" />
            <TextBlock Margin="0,10,2,0" Foreground="Purple" FontWeight="Bold" Text="{Binding FileHandler.FileName}" />
            <TextBlock Foreground="Red" FontWeight="Bold" Text="{Binding MediaHandler.Duration}" />
            <!--The data template to use for the supported actions is chosen with a DataTemplateSelector class, and is provided by the Action itself.-->
            <ItemsControl Grid.Column="1" ItemsSource="{Binding SupportedActions}" ItemTemplateSelector="{StaticResource ActionTemplateSelector}"/>
        </Grid>
    </DataTemplate>
    <DataTemplate x:Key="BrowserDetailTemplate">
        <DataTemplate.Resources>
            <actions:ActionTemplateSelector x:Key="ActionTemplateSelector"/>
        </DataTemplate.Resources>
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <TextBlock Margin="10,0,0,0" Foreground="#33555555" FontSize="30" FontWeight="Bold" Text="AVI video Detail" />
            <TextBlock Margin="0,10,2,0" Foreground="Orange" FontWeight="Bold" Text="{Binding FileHandler.FileName}" />
            <TextBlock Foreground="Green" FontWeight="Bold" Text="{Binding MediaHandler.Duration}" />
            <!--The data template to use for the supported actions is chosen with a DataTemplateSelector class, and is provided by the Action itself.-->
            <ItemsControl Grid.Column="1" ItemsSource="{Binding SupportedActions}" ItemTemplateSelector="{StaticResource ActionTemplateSelector}"/>
        </Grid>

    </DataTemplate>
</ResourceDictionary>